package com.example.a2032.db.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;


import com.example.a2032.entity.DeviceInfo;

@Dao
public interface  DeviceInfoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
     void insert(DeviceInfo deviceInfo);

    @Query("select * from deviceInfo")
    LiveData<DeviceInfo> loadAllDeviceInfo();

    @Query("select * from deviceInfo")
    DeviceInfo loadDeviceInfo();

    @Update
    void updateDeviceInfo(DeviceInfo deviceInfo);
}
